import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)


export default new Router({
    routes: [{
            path: '/',
            redirect: '/servicePlatform'
        },
        {
            path: '/helloWorld', //测试页面
            component: resolve => require(['@/components/HelloWorld'], resolve)
        },
        {
            path: '/formY', //测试页面
            component: resolve => require(['@/formY'], resolve)
        },
        {
            path: '/epidemicHome', //首页
            component: resolve => require(['@/components/epidemicHome/epidemicHome'], resolve)
        },
        {
            path: '/servicePlatform', //服务平台首页
            component: resolve => require(['@/components/home/servicePlatform'], resolve)
        },
        {
            path: '/personInforation', //居民信息录入简版
            component: resolve => require(['@/components/home/personInforation'], resolve)
        },
        {
            path: '/cdPersonInforation', //常德居民信息录入
            component: resolve => require(['@/components/home/cdPersonInforation'], resolve)
        },
        {
            path: '/home', //主页
            component: resolve => require(['@/components/home/home'], resolve)
        }, {
            path: '/survey', //病毒流调
            component: resolve => require(['@/components/home/survey'], resolve)
        },
        {
            path: '/other', //其它页面嵌入
            component: resolve => require(['@/components/home/other'], resolve)
        },
        {
            path: '/dailylist', //统计结果
            component: resolve => require(['@/components/dailylist/dailylist'], resolve)
        },
        {
            path: '/eforecast', //疫情预测
            component: resolve => require(['@/components/home/eforecast'], resolve)
        },
        {
            path: '/needEnter', //医院需求录入
            component: resolve => require(['@/components/needEnter/needEnter'], resolve)
        },
        {
            path: '/needEnterBedNum', //医院床位录入
            component: resolve => require(['@/components/needEnter/needEnterBedNum'], resolve)
        },
        {
            path: '/needEnterMaterial', //医院物资需求录入
            component: resolve => require(['@/components/needEnter/needEnterMaterial'], resolve)
        },
        {
            path: '/needEnterNurse', //医院医护人员录入
            component: resolve => require(['@/components/needEnter/needEnterNurse'], resolve)
        },
        {
            path: '/personHeat', //人员体温信息录入
            component: resolve => require(['@/components/home/personHeat'], resolve)
        },
        {
            path: '/responsibler', //责任人引导页
            component: resolve => require(['@/components/home/responsibler'], resolve)
        },
        {
          path: '/enterpriseInforation', //企业
          component: resolve => require(['@/components/home/enterpriseInforation'], resolve)
        },
        {
          path: '/enterpriseHome', //企业2
          component: resolve => require(['@/components/enterprise/enterpriseHome'], resolve)
        },
        {
            path: '/reportSuccess', //上报成功，此页面需要传入query:{'name': '', 'idNumber':'123','phone': '123'}
            component: resolve => require(['@/components/commons/reportSuccess'], resolve)
        },
        { path: '*', component: resolve => require(['@/components/commons/notFound'], resolve) }, //路由按顺序从上到下，依次匹配。最后一个*能匹配全部，然后重定向到主页面

    ]
})